package com.example.wn.user.controller;


import com.example.wn.common.entity.UserInfo;
import com.example.wn.user.feign.MessageFeignClient;
import com.example.wn.user.feign.OrderFeignClient;
import com.example.wn.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;


import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    OrderFeignClient orderFeignClient;

    @Autowired
    MessageFeignClient messageFeignClient;

    @Autowired
    UserService userService;

    @GetMapping("/getUserInfo")
    public String getUserInfo(){
        return orderFeignClient.getOrderInfo();
    }

    @PostMapping("/sendMessage")
    public void sendMessage(@RequestBody UserInfo userInfo){
        messageFeignClient.sendMessage(userInfo);
    };

    @PostMapping("/login")
    public void login(@RequestBody UserInfo userInfo){


    }
}
